package HP;

public class GongBeiGongYue {
    public static void main(String[] args) {
        int a = 55;
        int b = 15;
        if (a > b) {
            int temp;
            temp = a;
            a = b;
            b = temp;

        }
        if (a < b) {
            int max = 0;
            for (int i = 1; i <= a; i++) {
                if (a % i == 0) {
                    if (b % i == 0) {
                        if (i > max) {
                            max = i;
                        }
                    }
                }

            }
            System.out.println(max);
        }
        if (a == b) {
            System.out.println("两个数不能相同");
        }
    }
}
